Make sure smtpmail produces valid mbox files with Unix EOLs for FCC.
authorEli Zaretskii <eliz@gnu.org>
Fri, 9 Mar 2012 11:06:44 +0000 (13:06 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 9 Mar 2012 11:06:44 +0000 (13:06 +0200)
 lisp/mail/smtpmail.el (smtpmail-send-it): Bind
 coding-system-for-write to *-unix, so that FCC files are kept in
 valid mbox format.

lisp/ChangeLog
lisp/mail/smtpmail.el

index 993c575189db5ae165effd33faf742405a4746f5..7468195cd92fd8b5848bee958b95d001931ae98e 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * mail/smtpmail.el (smtpmail-send-it): Bind
+       coding-system-for-write to *-unix, so that FCC files are kept in
+       valid mbox format.
+
 2012-03-09  Glenn Morris  <rgm@gnu.org>
 
        * files.el (dir-locals-find-file):
index 3233cff2768a431318a0a2a31b291b558edfc11d..8e96e2c94388e6a6597ad299062ccf741bb20e1c 100644 (file)
@@ -324,7 +324,10 @@ The list is in preference order.")
            (if (re-search-forward "^FCC:" delimline t)
                ;; Force `mail-do-fcc' to use the encoding of the mail
                ;; buffer to encode outgoing messages on FCC files.
-               (let ((coding-system-for-write smtpmail-code-conv-from))
+               (let ((coding-system-for-write
+                      ;; mbox files must have Unix EOLs.
+                      (coding-system-change-eol-conversion
+                       smtpmail-code-conv-from 'unix)))
                  (mail-do-fcc delimline)))
            (if mail-interactive
                (with-current-buffer errbuf